<?php

class My_View_Helper_Plural
{

    public function Plural( $valor, $singular, $plural )
    {
        if(!preg_match('/%s/', $singular)):
            $singular = '%s '.$singular;
        endif;
        if(!preg_match('/%s/', $plural)):
            $plural = '%s '.$plural;
        endif;
        if($valor>1){
            return sprintf($plural, $valor);
        } else {
            return sprintf($singular, $valor);;
        }
    }

}
